import request from '@/utils/request';

type Params = {
  page?: number;
  pageSize?: number;
  mobile?: string;
  username?: string;
};

// 获取用户列表
export const getMemberList = (params: Params) => request({ url: '/api1/adminmember/list', params });

type StatusData = {
  status: boolean | number;
  id: string | number;
};
// 更改用户状态  
export const postMemberStatus = (data: StatusData) =>
  request({ url: '/api1/adminmember/status', method: 'post', data });

// 添加用户
export const postMemberEdit = (data: any) =>
  request({ url: '/api1/adminmember/edit', method: 'post', data });

// 删除用户
export const postMemberDelete = (id: number) =>
  request({ url: '/api1/adminmember/delete', method: 'post', data: { id } });
// 重置用户密码
export const postMemberResetPwd = (data: { id: number; password: string }) =>
  request({ url: '/api1/adminmember/resetPwd', method: 'post', data });






